chore(common): add root .dockerignore to reduce build context size#1727
Merged
mergify[bot] merged 1 commit intomainfrom Jan 7, 2026
Merged
chore(common): add root .dockerignore to reduce build context size#1727mergify[bot] merged 1 commit intomainfrom
mergify[bot] merged 1 commit intomainfrom
Conversation
🧪 CI InsightsHere's what we observed from your CI run for d3ee5f7. 🟢 All jobs passed!But CI Insights is watching 👀 |
a3fcda0 to
7876a1f
Compare
Add a root .dockerignore file to exclude unnecessary files from Docker build context when using repo root as the build context (used by test-suite compose files). Key exclusions: - **/target/ - Rust build artifacts (can be GB-scale) - **/fhevm-keys/ - FHE key files (can be GB-scale) - **/node_modules/ - Node.js dependencies - docs/, charts/, *.pdf, *.md - Documentation - IDE/OS files, test artifacts, logs, Python cache - CI/CD config files not needed for builds - protocol-contracts/, sdk/, golden-container-images/, ci/ All Dockerfile COPY paths are preserved: - coprocessor/fhevm-engine/, coprocessor/proto/ - gateway-contracts/, kms-connector/ - host-contracts/, library-solidity/, test-suite/ - .git/ (needed for build metadata) - package.json, package-lock.json Build context reduction: ~2.53 GB → ~26 MB (99% reduction) Closes #837
7876a1f to
d3ee5f7
Compare
Contributor
Author
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyDetailsThe pull request has been merged automatically at 96e9391 |
Merge Queue Status✅ The pull request has been merged at d3ee5f7 This pull request spent 1 hour 17 minutes 2 seconds in the queue, including 16 minutes 20 seconds running CI. Required conditions to merge
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.dockerignoreto dramatically reduce Docker build context size for test-suite compose buildstargetartifacts, ~20Gb with) to ~26 MB (99% reduction). Even more reduction when the user has a localtargetfolder with rust artifactsBuild Context Size Comparison
Test Results
All Dockerfiles successfully build with the new
.dockerignore:coprocessor/fhevm-engine/tfhe-worker/Dockerfile- Context: 10.66 MBcoprocessor/fhevm-engine/gw-listener/Dockerfile-.git/HEADcopied successfullykms-connector/crates/gw-listener/Dockerfile-.git/directory copied successfullytest-suite/e2e/Dockerfile- Context: 7.18 MBWhat's Excluded
**/target/**/fhevm-keys/,**/*.fhekey**/node_modules/,**/dist/docs/,charts/,*.pdf,**/*.md.idea/,.vscode/,.DS_Storeprotocol-contracts/,sdk/,ci/,golden-container-images/What's Preserved (Required by Dockerfiles)
All paths used by Dockerfile COPY statements are preserved:
coprocessor/fhevm-engine/,coprocessor/proto/gateway-contracts/,kms-connector/host-contracts/,library-solidity/,test-suite/.git/(needed for build metadata in some Dockerfiles)package.json,package-lock.jsonWhy This Matters
The test-suite compose files use the repo root as Docker build context:
Without a root
.dockerignore, Docker transfers the entire repo (includingfhevm-keys/at ~2.3 GB andtarget/. compilation artifacts that can be dozen of GBs) to the daemon for every build. This can take minutes several minutes.Closes https://github.com/zama-ai/fhevm-internal/issues/837